package com.hyperfix.simulator.senor;

import com.hyperfix.simulator.timer.FlowTableRegistrar;

/**
 * @author JiangChunYu
 * 2024/4/20
 */
public class TotalFlowSenor {
    public byte[] nextData(int pipelineId) {
        long v = FlowTableRegistrar.getFlow(pipelineId);
        byte[] data = new byte[3];
        data[0] = (byte) (v >>> 16);
        data[1] = (byte) (v >>> 8);
        data[2] = (byte) v;
        return data;
    }
}
